﻿using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data;
using System.Windows.Forms;
using DevExpress.XtraGrid.Columns;
using WinUtilities.Class;

namespace WinUtilities.Form
{
    public partial class FormShowLog : DevExpress.XtraEditors.XtraForm
    {
        public FormShowLog()
        {
            InitializeComponent();
            grvLogResult.KeyDown += grvSearchResult_KeyDown;
            KeyDown += FormLogResult_KeyDown;
        }

        public void DisplayLogResult(DataSet logData)
        {
            grvLogResult.DataSource = logData.Tables[0];
        }

        void FormLogResult_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                Close();
            }
        }

        void grvSearchResult_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                Close();
            }
        }

        public delegate DataSet ShowLog();


    }
}